<%--
  Created by IntelliJ IDEA.
  User: Jovi
  Date: 2018/8/30
  Time: 下午2:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script type="text/javascript" src="../../scripts/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#testJson").click(function () {
            var url = this.href;
            var args = {};
            $.post(url,args,function (data) {
                for (var i = 0; i < data.length; i++) {
                    var id = data[i].id;
                    var lastName =data[i].lastName;
                    alert(id+":"+lastName)
                }
            });
            return false;
        });
    })
</script>
<body>

<a href="/rest/emps">List ALL Employees</a><br><br>



<a href="/rest/testJson" id="testJson">Test Json</a><br><br>


<a href="/rest/testResponseEntity" >Test ResponseEntity</a><br><br>


<%--
    关于国际化
    1.在页面上能够根据浏览器语言设置的情况对文本（不是内容），时间，数值进行本地化处理
    2.可以在bean中获取国际化资源文件Locale 对应的消息
    3.可以通过超链接切换Locale，而不再依赖于浏览器语言设置情况

    解决：
    1.使用JSTL的fmt标签
    2.在bean中注入 ResourceBundleMessageSource的实例，使用对应的其getMessage
    3.配置LocaleResolver 和LocaleChangeInterceptor
--%>

<a href="/rest/i18n">I18N PAGE</a><br><br>


<form action="/rest/testFileUpload" method="post" enctype="multipart/form-data">
    File:<input type="file" name="file">
    Desc:<input type="text" name="desc">
    <input type="submit" value="Submit">
</form>

<a href="/rest/testExceptionHandlerExceptionResolver?i=19">Test ExceptionHandlerExceptionResolver</a><br><br>


<a href="/rest/testResponseStatusExceptionResolver?i=13">Test ResponseStatusExceptionResolver</a><br><br>


<a href="/rest/testDefaultHandlerExceptionResolver?i=13">Test DefaultHandlerExceptionResolver</a><br><br>


<a href="/rest/testSimpleMappingExceptionResolver?i=13">Test SimpleMappingExceptionResolver</a><br><br>

</body>
</html>
